package cup.league.app;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;

public class RegisterTeamsActivity extends Activity{
	
	LinearLayout linearLayout;
	
	@Override
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		setContentView(R.layout.registerteams);
		
		linearLayout = (LinearLayout) findViewById(R.id.mainLayout);
		Intent i = getIntent();
		int numPart = i.getIntExtra("numPart", -1);
		if(numPart == -1){
		}
		else
			addFields(numPart);
		
	}

	private void addFields(int numPart) {
		for(int i = 0; i < numPart; i++){
			EditText text = new EditText(this);
			text.setId(i);
			linearLayout.addView(text);
		}
		
	}

}
